
.creation-page {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
  position: relative;
  background: url('../../assets/creation.png') center/cover no-repeat fixed;
}

/* 修改伪元素的透明度，让背景能够显示出来 */
.creation-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7); /* 降低透明度 */
  backdrop-filter: blur(5px);
}

.creation-sidebar {
  position: relative;
  z-index: 1;
  border-right: 1px solid #f0f0f0;
  padding: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
}

.menu-category {
  border-bottom: 1px solid #f0f0f0;
}

.category-title {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s;
}

.category-title:hover {
  background: rgba(0, 0, 0, 0.02);
}

.category-title .category-icon {
  margin-right: 8px;
}

.category-title .arrow-icon {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.3s;
}

.category-title.expanded .arrow-icon {
  transform: rotate(90deg);
}

.category-items {
  background: #fafafa;
}

.menu-item {
  padding: 8px 20px 8px 44px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  color: #666;
}

.menu-item:hover {
  background: rgba(0, 0, 0, 0.02);
  color: #1890ff;
}

.creation-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
}

.creation-header {
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.creation-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.back-button {
  position: absolute;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #666;
  cursor: pointer;
}

.creation-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.prompt-area {
  border-top: 1px solid #f0f0f0;
  padding: 20px;
  background: #fff;
}

.prompt-main {
  background: #f5f7f9;
  border-radius: 12px;
  padding: 16px;
}

.prompt-tools {
  display: flex;
  align-items: center;
  margin-top: 16px;
  gap: 16px;
}

.tool-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  font-size: 13px;
}

.generate-button {
  width: 100%;
  height: 40px;
  margin-top: 16px;
  border-radius: 8px;
}

.result-area {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.result-content {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  min-height: 200px;
  white-space: pre-wrap;
  line-height: 1.6;
  color: #333;
  font-size: 14px;
}

.result-actions {
  display: flex;
  gap: 12px;
}

.templates-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px 0;
}

.template-category {
  flex: 0 0 300px;
  background: #f5f7f9;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s ease;
  opacity: 0.7;
  transform: scale(0.95);
}

.template-category-active {
  opacity: 1;
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  background: #fff;
  border: 1px solid #e6f4ff;
}

.template-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.ant-dropdown-menu {
  padding: 8px;
}

.ant-dropdown-menu-item {
  padding: 8px 12px;
  border-radius: 4px;
}

.ant-dropdown-menu-submenu-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ant-dropdown-menu-submenu-title span {
  font-size: 14px;
}

/* 删除原有的 templates-grid 相关样式 */

.intro-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.intro-header {
  text-align: center;
  margin-bottom: 40px;
}

.intro-header h2 {
  font-size: 32px;
  margin-bottom: 16px;
  background: linear-gradient(120deg, #1890ff, #722ed1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.intro-header p {
  font-size: 16px;
  color: #666;
}

.intro-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.feature-item {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.feature-content h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #333;
}

.feature-content p {
  color: #666;
  line-height: 1.5;
}

.intro-guide {
  background: #f5f7f9;
  padding: 24px;
  border-radius: 12px;
  margin-top: 40px;
}

.intro-guide h3 {
  font-size: 20px;
  margin-bottom: 16px;
  color: #333;
}

.intro-guide ol {
  padding-left: 20px;
}

.intro-guide li {
  margin-bottom: 12px;
  color: #666;
  line-height: 1.5;
}

/* 移除不再使用的样式 */
.templates-grid,
.template-category,
.template-category-active,
.template-items,
.ant-dropdown-menu,
.ant-dropdown-menu-item,
.ant-dropdown-menu-submenu-title {
  display: none;
}

.chat-container {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.message {
  max-width: 80%;
  padding: 16px;
  border-radius: 12px;
  position: relative;
}

.user-message {
  align-self: flex-end;
  background: #e6f4ff;
  margin-left: 20%;
}

.ai-message {
  align-self: flex-start;
  background: #f5f5f5;
  margin-right: 20%;
}

.message-content {
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 14px;
}

.copy-button {
  position: absolute;
  right: 8px;
  bottom: 8px;
  opacity: 0;
  transition: opacity 0.3s;
}

.ai-message:hover .copy-button {
  opacity: 1;
}

.model-selector {
  margin-bottom: 16px;
}

.model-selector .ant-radio-group {
  display: flex;
  gap: 8px;
}

.model-selector .ant-radio-button-wrapper {
  flex: 1;
  text-align: center;
}

.generated-image {
  position: relative;
  display: inline-block;
}

.generated-image img {
  max-width: 100%;
  border-radius: 8px;
}

.download-button {
  position: absolute;
  bottom: 16px;
  right: 16px;
  opacity: 0;
  transition: opacity 0.3s;
}

.generated-image:hover .download-button {
  opacity: 1;
}